FROM is.melot.top/nano/devops/basic-node:14
COPY . /app_dev
COPY . /app_prod
RUN cd /app_dev && npm --registry https://registry.npmmirror.com i && export NODE_ENV=development && npm run build:dev && \
    cd /app_prod && cp -r /app_dev/node_modules . && export NODE_ENV=production && npm run build:prod
CMD [ "node", "start" ]
